<template>
    <view>
      <div class="default-main ba-table-box">
          <div class="ba-operate-form" style="background-color: #fff;min-height: 85vh;">

              <el-form :model="form" label-width="220px" style="width: 800px">
                      <el-form-item label="导出待发货订单模板">
                        <el-link type="danger">点我下载</el-link>
                      </el-form-item>
              </el-form>
              <el-form :model="form" label-width="220px" style="width: 800px">
                      <el-form-item label="上传填写快递单号的模板">
                        <el-upload
                            class="upload-demo"
                            drag
                            action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
                            multiple
                        >
                            <el-icon class="el-icon--upload"><upload-filled /></el-icon>
                            <div class="el-upload__text">
                            直接拖拽excel文件到此或者<em>点击这里上传</em>
                            </div>
                            <template #tip>
                            <div class="el-upload__tip">
                                仅支持xls、xlsx格式文件
                            </div>
                            </template>
                        </el-upload>
                      </el-form-item>
              </el-form>
              
              <el-form :model="form" label-width="150px" style="width: 800px">
                  <el-button type="primary" style="margin-left: 150px;">开始批量发货</el-button> 
              </el-form>
              

          </div>
      </div>
    </view>
</template>

<script setup lang="ts">
import type { FormInstance, FormItemRule } from 'element-plus'
import { inject, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import FormItem from '/@/components/formItem/index.vue'
import { useConfig } from '/@/stores/config'
import type baTableClass from '/@/utils/baTable'
import { buildValidatorData } from '/@/utils/validate'

const config = useConfig()
const formRef = ref<FormInstance>()
const baTable = inject('baTable') as baTableClass

const { t } = useI18n()
const form = ref([{
  name:'',
  order_type:'',
  order_status:'',
  group:''
}])
const user_group = ref([])
const rules: Partial<Record<string, FormItemRule[]>> = reactive({
  ordernum: [buildValidatorData({ name: 'number', title: t('order.order.ordernum') })],
  create_time: [buildValidatorData({ name: 'date', title: t('order.order.create_time') })],
  is_pay: [buildValidatorData({ name: 'number', title: t('order.order.is_pay') })],
  order_status: [buildValidatorData({ name: 'number', title: t('order.order.order_status') })],
  tel: [buildValidatorData({ name: 'number', title: t('order.order.tel') })],
  tradernum: [buildValidatorData({ name: 'number', title: t('order.order.tradernum') })],
  deliver_time: [buildValidatorData({ name: 'date', title: t('order.order.deliver_time') })],
  receive_time: [buildValidatorData({ name: 'date', title: t('order.order.receive_time') })],
  complete_time: [buildValidatorData({ name: 'date', title: t('order.order.complete_time') })],
  money: [buildValidatorData({ name: 'number', title: t('order.order.money') })],
})
</script>

<style scoped lang="scss"></style>
